"use strict"

/**
 * 内蒙古自治区采购网爬虫
 *  url路径 有问题
 */

var Base = require("./base");
var nmg_spider = new Base();
nmg_spider.name = "内蒙古自治区采购网";
nmg_spider.encode = "GBK";

nmg_spider.getPageUrl = function(pg) {
    return "http://www.nmgp.gov.cn/procurement/pages/tender.jsp?pos=" + pg;
};

nmg_spider.getItems = function($) {
    var items = [];
    $(".title a").each(function(index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.attr("title");
        item.url = "http://www.nmgp.gov.cn" + e.attr("href");
        item.source = nmg_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = nmg_spider;